﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace AttentenceCheckSystem
{
    /// <summary>
    /// StaffWindow.xaml 的交互逻辑
    /// </summary>
    public partial class StaffWindow : Window
    {
        Database1DataSetTableAdapters.userTableAdapter adapter = new Database1DataSetTableAdapters.userTableAdapter();
        public StaffWindow()
        {
            InitializeComponent();
            DataContext = adapter.GetData();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            bool bFlag = dataGrid1.CommitEdit();
            adapter.Update(DataContext as Database1DataSet.userDataTable);
            DialogResult = true;
            Close();
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
            Close();
        }
    }
}
